UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'StwTOfxUnXzoG5me/lpcBt5v6sx6YioRYOdEKieUiac='
WHERE
key_id = '71bb2a1c4e9fcaada5809e963205329d911ce29b5ac1eaf2ae9619a443bcc708'
AND (
token = 'StwTOfxUnXzoG5me/lpcBt5v6sx6YioRYOdEKieUiac='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)