UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pGHulRZirBAiTH/8RMCBBRdtpEiWFBKKy7rYYQouXbg=' 
WHERE 
  key_id = 'be70e82e6c0e88ef8d11b607ae80fe06383ee9cf64514c6fdea3795b7934e954' 
  AND (
    token = 'pGHulRZirBAiTH/8RMCBBRdtpEiWFBKKy7rYYQouXbg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027