UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uxIGrjhuNKUfbiwTZIWdCoElGn6RkGMbHJGGkkiahco='
WHERE
key_id = '579657ec3b32c9e92a2ac78b3281b96e811907ed07368c1a69e40926b7a166c3'
AND (
token = 'uxIGrjhuNKUfbiwTZIWdCoElGn6RkGMbHJGGkkiahco='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)