UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KoU2O/7zpUumb/QFCsORxRJJfZmATHJi4UwmqwyLzL8='
WHERE
key_id = '19f09b3b08071690462ec3859865c5fa81385caf4c5fc895cc2df5daf463e20a'
AND (
token = 'KoU2O/7zpUumb/QFCsORxRJJfZmATHJi4UwmqwyLzL8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)