UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tqdSbj0BrEE/MP/ptE2QI/Ee6GtG8YIWeddsLNcqaMo=' 
WHERE 
  key_id = '352f3882aef57ff4f54c4cb5fe8dce627a1b24d91f239b582f6c3b317fa62c26' 
  AND (
    token = 'tqdSbj0BrEE/MP/ptE2QI/Ee6GtG8YIWeddsLNcqaMo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030