UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3A0EyJQHrgydXiqfR+aaz127tNwtfs+hzPHFp6jocPo='
WHERE
key_id = '73e2af12f35d765d5f8aa7726060fc1f402a5cd28cdd58b499cb8651c103f86b'
AND (
token = '3A0EyJQHrgydXiqfR+aaz127tNwtfs+hzPHFp6jocPo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)