UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uBJletoFMDRat4VQ7TdKpMNGCZG6tlXR4hIInY9ER6U='
WHERE
key_id = '758353365456033671a11dd9e20b2a8682f3426f24e3896f29da12f06fa7c077'
AND (
token = 'uBJletoFMDRat4VQ7TdKpMNGCZG6tlXR4hIInY9ER6U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)