UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B/iM8viEbi0jT1Nn66ZtLAqJaBAV8MEdSl7hR/lT/kg='
WHERE
key_id = 'd364c5bcc32bc5fe7470c3efff35ff5c841dbe432b53e566a39153a04bbf0c7a'
AND (
token = 'B/iM8viEbi0jT1Nn66ZtLAqJaBAV8MEdSl7hR/lT/kg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)