UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VqoPmreqPApbeLkaYtKxY1PlJeWEkXjJkYUtxP5oPqc='
WHERE
key_id = '6097968cfaf4013a676701ece6562b624aa0803a61c7217530facfddf190c334'
AND (
token = 'VqoPmreqPApbeLkaYtKxY1PlJeWEkXjJkYUtxP5oPqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)