UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zMfrFHvHJhvzsatsUR4b9+L0PH04iK72s0q4nR/9aCs='
WHERE
key_id = '203e66ad55c600749d2a14569900a3bfa8948efd0c20cb36ac1fbd0062ad8b5a'
AND (
token = 'zMfrFHvHJhvzsatsUR4b9+L0PH04iK72s0q4nR/9aCs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)