UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hlkJ814nSdwtIQTii/ocRbuLQ9wxZwSCf2sRpK+cfqM='
WHERE
key_id = '270fbe6df88bff3a8eb8cb4c2120acf5b5144132837186ad875b5648c6f2477e'
AND (
token = 'hlkJ814nSdwtIQTii/ocRbuLQ9wxZwSCf2sRpK+cfqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)