UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OMUgK3mHrBqCeoVwnCwtQiCM5uWfMhqzsNHcwG/tXjw='
WHERE
key_id = '4aedec4bd77d4ebb06dc42b2110c5a3158a0dbb76ed33131edee09a87094b6b8'
AND (
token = 'OMUgK3mHrBqCeoVwnCwtQiCM5uWfMhqzsNHcwG/tXjw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)