UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FsPlnzW5poJ5yQsb/FujgaMUh29u52gK0UztkD9xXQU='
WHERE
key_id = 'c5eb1d650cf95b9bf94426dc71b8672fd6d2c061c43b4116ad024d5adda01a83'
AND (
token = 'FsPlnzW5poJ5yQsb/FujgaMUh29u52gK0UztkD9xXQU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)