UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bM3U8e+rAKQi6G/CsGW9EJD+A6GVDCiNdu7MRN/ucto='
WHERE
key_id = '90a4d4a519a6c89641026cb9276d3fc17fd1490f2879dafa178608ec1130a741'
AND (
token = 'bM3U8e+rAKQi6G/CsGW9EJD+A6GVDCiNdu7MRN/ucto='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)