UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rdcaMtyWWvZaVpM0wORa7+6P5TF9AI5/MVVUI7lGzKI='
WHERE
key_id = '807a19c207d0d3600940988647e2766a74c73225541c3022cf28b018b3390f13'
AND (
token = 'rdcaMtyWWvZaVpM0wORa7+6P5TF9AI5/MVVUI7lGzKI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)