UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'c7ZQMDMiuOtlNZWL6TS8bg5xfzX8AFTcl+vklZ+jb4I='
WHERE
key_id = '50defdc5cd10de3c388d4fe4da7f67ba386e0d28a66d5a19a9d5231ad02289db'
AND (
token = 'c7ZQMDMiuOtlNZWL6TS8bg5xfzX8AFTcl+vklZ+jb4I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)