UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wfTSeJmh/PkubOGDYljO3ueq2AZdLwi5Vku7r94YgaU='
WHERE
key_id = '0a068b663b133d5e429c88ab21ba0e0493b3724320a97bced902ef5488a846d6'
AND (
token = 'wfTSeJmh/PkubOGDYljO3ueq2AZdLwi5Vku7r94YgaU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)