UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oBBqOUb55oOMqcA7AKeEux/YY5ueElTVfbSxlrle0r0='
WHERE
key_id = '3b814b9a0f476e77080d1125d9bb341a40a55eb318ed892aa6ab7d88df08e751'
AND (
token = 'oBBqOUb55oOMqcA7AKeEux/YY5ueElTVfbSxlrle0r0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)