UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KsFYP3+Zz1ZwINb85jjIsRp/8La6VMoEJ5uv9eFNfEQ='
WHERE
key_id = '4644bfd3ad0e6b00f9fd5ecee1641580376a3d42fd7e19ce5ebad7a88e78d589'
AND (
token = 'KsFYP3+Zz1ZwINb85jjIsRp/8La6VMoEJ5uv9eFNfEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)