UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sdInc/lbYMem1CLdQLtWEg9CjQ2xZDbUw3D9kmxKbKo='
WHERE
key_id = '7dca1d61e0f4d6740653cbc65566db240ff2053f37cd9d6c193e88cbad922af9'
AND (
token = 'sdInc/lbYMem1CLdQLtWEg9CjQ2xZDbUw3D9kmxKbKo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)