UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ey350gvOkPfGLP0G1e+JvSNYA9bCu7KdxjNVmMEe7EQ='
WHERE
key_id = '2ee4db89a2d230da668b279b85c6af930ec5aad13a2efe6502f3f000f8a1831f'
AND (
token = 'ey350gvOkPfGLP0G1e+JvSNYA9bCu7KdxjNVmMEe7EQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)