UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IgnLPNOnjllldto0GdUkwDty3DctWTivvqjYUUjNXg0='
WHERE
key_id = '05891477d2dd61cd3de0cc1a8f7ebe2dd1127cede53ebf393bf413f7ec60c5db'
AND (
token = 'IgnLPNOnjllldto0GdUkwDty3DctWTivvqjYUUjNXg0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)