UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fwaO/Qh9izh8rkPGaxNa4MAsygk8YPgXdYMI8xHN/fM='
WHERE
key_id = '3b28a0da2261e0759d477a0919255509a79ff7246603e0028fe8eecaad82072d'
AND (
token = 'fwaO/Qh9izh8rkPGaxNa4MAsygk8YPgXdYMI8xHN/fM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)