UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ll7jl2WkvkfXohMBvXmKFidUQxdU076weaAPBkbbURw='
WHERE
key_id = 'fcdc074c4a7a187b4c787e75b7ce208a2946570fe9646878126b854eaf289d24'
AND (
token = 'Ll7jl2WkvkfXohMBvXmKFidUQxdU076weaAPBkbbURw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)