UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zgho3Yysq4DCXSZUSJEg/7pSCL+A30O5yzXRf+bMoxc='
WHERE
key_id = 'ee85e57a7d9b4f3411b27bb6d65de0f503f4744539bc4600cfc6645da052525b'
AND (
token = 'Zgho3Yysq4DCXSZUSJEg/7pSCL+A30O5yzXRf+bMoxc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)