UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zY5GbS5i8oyWk0aPa+tG9c7m8ZkXdBW1/X+YuniGv8A='
WHERE
key_id = 'f41451292c7d5f43ba1d6bd9620ac6db04c209c55b7902113030dc58d82f3fa7'
AND (
token = 'zY5GbS5i8oyWk0aPa+tG9c7m8ZkXdBW1/X+YuniGv8A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)