UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wuwQni4dBClMeXCwTD1L0Nra/LjdvQUizva9Zd8ZsKI='
WHERE
key_id = '957b14c6ff77be6cb78c3e696fe77fe8e53b811e77420cdba6317cab5d02a02a'
AND (
token = 'wuwQni4dBClMeXCwTD1L0Nra/LjdvQUizva9Zd8ZsKI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)