UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wbHxIgZdpDT0wlzdW7wZ2XmPB5+UvPloTSPMiFcwI7w='
WHERE
key_id = '956db973c69cd5e370003655735155cb966e71ce9c670781b66796204e39c1d8'
AND (
token = 'wbHxIgZdpDT0wlzdW7wZ2XmPB5+UvPloTSPMiFcwI7w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)