UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Mfu3o7euOGm2HrBLb2EdjmrER69sq2gEwa+9aTYd//4=' 
WHERE 
  key_id = 'b9ed8beb6bcb57522bbbf3dd7804dc141712ed5bfcc1208b4ad3101138c9980f' 
  AND (
    token = 'Mfu3o7euOGm2HrBLb2EdjmrER69sq2gEwa+9aTYd//4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036