UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0XVTE0GLu5ACeUD18fRYsuqSn1bGHaJSUbqCd44EhkI=' 
WHERE 
  key_id = '026f3ce0c3c3bc191676d0b81c1678a36a261fb31916d56b04c2f302e2d76109' 
  AND (
    token = '0XVTE0GLu5ACeUD18fRYsuqSn1bGHaJSUbqCd44EhkI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030