UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sYt2PnJ4I6bEclH+eGYRloW3ZPjImt5gJcGHgBy2WvA='
WHERE
key_id = '78d5273bf0bbda99f8742d01a860791fba20920228dbfa3310cf30823a1f9c04'
AND (
token = 'sYt2PnJ4I6bEclH+eGYRloW3ZPjImt5gJcGHgBy2WvA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)