UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Lrp80SLzRhE9D9awovgWlUmEG/yXQbELtx1LkTmFDNg='
WHERE
key_id = '56e2e2870f7bee03c98dff375a6f157b832b7ff3527d03b527d538edda6e1e93'
AND (
token = 'Lrp80SLzRhE9D9awovgWlUmEG/yXQbELtx1LkTmFDNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)